import Vue from 'vue'
import Vuex from 'vuex' 
// import * as getters from './getters'
// import * as mutations from './mutations'
// import * as actions from './actions'
Vue.use(Vuex); 


const state = {
    // 测试数据
    num: 100  ,
    //修改学生头像时的id
    head_portrait_id:1111,
    //登陆用户名
    loginName:'',
    // 显示发布新鲜事的图片列表
    imgList: [],
    //保存文件
    file:[],
    // 显示历史文章数量
    allArticleCount:'',
    // 显示未审核文章数量
    noArticleCount:'',
    //区分校园新闻和校园随手拍
    schoolNews:'',
    schoolPhoto:'',
    // 显示新鲜事的标题和内容
    articalObj:{
       previewTitle:'',
       previewSubtitle:''
   },
   articalList:[],
   arr:[1,2,1,2,1,2],
   isfile:false,
  
//    currentUser:null,
//    isLogin:false,
//    token:""
}

const mutations = {  
    add(state){
        state.num++;
    },
    minus(state){
       state.num--;
     },
     articalAdd(){
       state.articalList.push(state.articalObj);
       // state.articalObj
     },
     numCount(){
        state.num=state.articalList.length;
     },
     
   }


export default new Vuex.Store({
    state,
    mutations,
    //getters,
   // actions
  });



 